import './styles/index.css'
import {RESOURCES} from "./mock";
import {XgPlayer} from "../xg-player";
import {Resource} from "../xg-player/types";

const resources: Resource[] = RESOURCES;

addEventListener('DOMContentLoaded', () => {
  new XgPlayer('#mse', {
    src: resources[0].url,
    autoplay: true,
    poster: '//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg',
    // resources
  });
  // console.log('xgPlayer', xgPlayer);
});


const str2 = '4(2(3)(1))(6(5))(2(3)(1))(6(5))';
const reg = /\(.*?\)/g;
const matched = str2.match(reg);
// const matchedAll = str2.matchAll(reg);
// console.log('matched', matched);
// console.log('matchedAll', matchedAll);
